<template>
  <div class="flex">
    <div class="p_data" style="margin-right:20px">
      <pageTitle title="个人资料" :is_link="false" />
      <el-form ref="form" label-width="80px">
        <el-form-item label="头像">
          <el-avatar size="large" :src="avatar"></el-avatar>
        </el-form-item>
        <el-form-item label="昵称">
          <el-input v-model="userInfo.nickname"></el-input>
        </el-form-item>
        <el-form-item label="手机号">
          <el-input v-model="userInfo.phone"></el-input>
        </el-form-item>
        <el-form-item label="出生日期">
          <el-date-picker
            v-model="userInfo.birthday"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="p_data">
      <pageTitle title="个人资料" :is_link="false" />
      <el-form ref="form" label-width="80px">
        <el-form-item label="头像">
          <el-avatar size="large" :src="avatar"></el-avatar>
        </el-form-item>
        <el-form-item label="昵称">
          <el-input v-model="userInfo.nickname"></el-input>
        </el-form-item>
        <el-form-item label="手机号">
          <el-input v-model="userInfo.phone"></el-input>
        </el-form-item>
        <el-form-item label="出生日期">
          <el-date-picker
            v-model="userInfo.birthday"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>
  <script>
import pageTitle from "@/components/pageTitle";
export default {
  components: { pageTitle },
  data() {
    return {
      avatar: require("@/assets/images/default.png"),
      userInfo: {
        nickname: "今天也要加油啊",
        phone: "15890399835",
        birthday: new Date(),
      },
    };
  },
  mounted() {},
  methods: {
    //获取用户信息
    async getUserInfo() {},
    async onSubmit() {
      this.$router.push('/test/index1/123')
    },
  },
};
</script>
<style scoped>
.p_data {
  width: 450px;
  background-color: #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.04);
  border-radius: 5px;
  overflow: hidden;
}
.el-form {
  margin-top: 20px;
  padding: 0 20px;
}
.el-input {
  width: 80%;
}
.el-form-item {
  height: 40px;
}
</style>